<%include file="include/head.html"%>
<div class="wrapper">
  <div id="div-home" class="main-info-box">
    <%include file="include/crumbs.html"%>
    <%include file="include/edit_nav.html"%>   
    <div class="div-info-body">
      <%if $history|@count gt 0%>
      <table>
	<caption>个人贡献记录</caption>
	<tr>
	  <th class="num">记录号
	  </th>
	  <th class="type">类型
	  </th>
	  <th class="content">内容
	  </th>
	  <th class="name">贡献者
	  </th>
	  <th class="date">编辑时间
	  </th>
	</tr>
	<% foreach name=history from=$history item=info %>
	<tr>
	  <td><!-- <%$smarty.foreach.history.iteration%> -->
	    <%$info.id%>
	  </td>
	  <td>
	    <%if $info.content_type eq $CONTENT_TYPE_FAMILY%>
	    家谱
	    <%elseif $info.content_type eq $CONTENT_TYPE_USER%>
	    用户
	    <%elseif $info.content_type eq $CONTENT_TYPE_RELATION%>
	    关系
	    <%elseif $info.content_type eq $CONTENT_TYPE_EVENT%>
	    事件
	    <%elseif $info.content_type eq $CONTENT_TYPE_PHOTO%>
	    照片
	    <%/if%>
	  </td>
	  <td>
	    id:<%$info.content.id%>, 
	    <%if $info.content_type eq $CONTENT_TYPE_FAMILY%>
	    <%$info.content.name%>，
	    <%$info.content.region%>
	    <%$info.content.notes%>
	    <%elseif $info.content_type eq $CONTENT_TYPE_USER%>
	    <%$info.content.realname%>
	    <%if $info.content.gender eq $MALE%>男<%else%>女<%/if%>
	    <%$info.content.day_of_birth%>
	    <%$info.content.region%>
	    <%elseif $info.content_type eq $CONTENT_TYPE_RELATION%>
	    <%$info.content.rel_name%>(<%$info.content.rel_id%>)是
	    <%$info.content.user_name%>(<%$info.content.user_id%>)的
	    <%assign var="t" value=$info.content.rel_type%>
	    <%$rel_types.$t%>
	    <%elseif $info.content_type eq $CONTENT_TYPE_EVENT%>
	    <%$info.content.event%>
	    <%elseif $info.content_type eq $CONTENT_TYPE_PHOTO%>
	    <%$info.content.photo%>
	    <%$info.content.memo%>
	    <%/if%>
	  </td>
	  <td>
            <!-- <a href="/users/contribution?userid=<%$info.author_id%>"> -->
	    <%$info.author_name%>
	    <!-- </a> -->
	  </td>
	  <td><%$info.ts_created%>
	  </td>
	</tr>
	<%/foreach%>
	<tr>
	  <td colspan="8">
	    <%$page%>
	  </td>
	</tr>
	<%/if%>
      </table>
    </div>
  </div>
</div>
<div class="clear"></div>
<%include file="include/bottom.html"%>

